<?php include PATH_VIEW . 'gongyong.php'; ?>
<title>分组菜单 - 后台管理</title>
<div class="all_main">
    <div class="module_right">
        <dl>
            <dt>操作说明 
            <a href="#" onclick="dianji(17)">[关闭/展开]</a>
            </dt>
            <dd id="bb17" style="margin-left: 3px;color: red;">以下的菜单名称及排序选项为必填项。</dd>
        </dl>
    </div>
    <div class="module_right_bottom">
        <dl>
            <dt>添加后台菜单分组</dt>
            <dd>
                <table border="0" cellpadding="0" cellspacing="0" width="100%" class="table">
                    <form name="form1" method="post" action="<?php echo URL; ?>" onsubmit="return checkkkMenu()">
                        <tr>
                            <td align="right">菜单分组名称</td>
                            <td>
                                <input type="text" name="Fname" id="Fname" value="" class="width200" ysp_is_null="0" ysp_type="not" ysp_length="2|16" />
                            </td>
                            <td class="last">
                                <span id="FnameYspMsg" class="font_gray">字符长度：2-16个</span>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">排序</td>
                            <td>
                                <input type="text" name="Fsort" id="Fsort" value="1" class="width50" maxlength="2" ysp_is_null="0" ysp_type="num" ysp_size="1|99" style="width:50px;"/>
                            </td>
                            <td class="last"><span id="FsortYspMsg" class="font_gray">数值越小，排列越前，数值大小范围：1-99</span></td>
                        </tr>
                        <tr>
                            <td align="right">说明</td>
                            <td colspan="2" class="last"><span class="font_gray">勾选下面的菜单则有权限操作下面菜单对应的页面</span></td>
                        </tr>
                        <tr>
                            <td colspan="3" class="last">
                                <?php
                                $i = 0;
                                foreach ($menu_arr[0] as $mid => $menu_name) {
                                    ?>
                                    <div class="menu_level_one" id="firstLevel<?php echo $i; ?>">
                                        <h3>
                                            <input type="checkbox" name="FmenuIds[]" id="topLevel<?php echo $i; ?>" onclick="firstCheckk(<?php echo $i; ?>)" value="<?php echo $mid; ?>" /> <?php echo $menu_name; ?>
                                        </h3>
                                        <?php
                                        if (isset($menu_arr[$mid])) {
                                            foreach ($menu_arr[$mid] as $mid2 => $menu_name2) {
                                                ?>
                                                <dl class="menu_level_list">
                                                    <dt><input name="FmenuIds[]" type="checkbox" onclick="secondCheckk(<?php echo $mid2; ?>)" value="<?php echo $mid2; ?>" /> <?php echo $menu_name2; ?></dt>
                                                    <dd id="secondLevel<?php echo $mid2; ?>">
                                                        <?php
                                                        if (isset($menu_arr[$mid2])) {
                                                            foreach ($menu_arr[$mid2] as $mid3 => $menu_name3) {
                                                                ?>
                                                                <label><input name="FmenuIds[]" type="checkbox" value="<?php echo $mid3; ?>" /> <?php echo $menu_name3; ?></label>
                                                                <?php
                                                            }
                                                        }
                                                        ?>
                                                    </dd>
                                                </dl>
                                                <?php
                                            }
                                        }
                                        ?>
                                    </div>
                                    <?php
                                    $i++;
                                }
                                ?>
                            </td>
                        </tr>
                        <tr>
                            <td>&nbsp;</td>
                            <td colspan="2" class="last">
                                <input type="submit" class="queren" name="ok" value="确认提交" />
                                <input type="button" class="fanhui" name="ok" value="返回" onclick="location.href = '<?php echo str_replace('&way=A', '&way=S', URL); ?>'"  />
                            </td>
                        </tr>
                    </form>
                </table>

            </dd>
        </dl>
    </div>


</div>